package com.kiss.fw.context;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public abstract class AbstractContext implements Serializable {
	private Map<Object, Object> attributes;
	
	protected AbstractContext() {
	}
	
	protected AbstractContext(final int _size) {
		attributes = new HashMap<Object, Object>(_size);
	}
	
	protected Map<Object, Object> getAttributes() {
		return attributes;
	}
	
	protected void setAttributes(final Map<Object, Object> _attributes) {
		attributes = _attributes;
	}
	
	public Object getAttribute(final Object _key) {
		return attributes.get(_key);
	}
	
	public void setAttribute(final Object _key, final Object _value) {
		attributes.put(_key, _value);
	}
}